<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .box{
            position: absolute;
            top: 0;
            left: 0;
            width: 100px;
            height: 100px;
            background-color: orange;
            /* animation-name: move;
            animation-duration: 1s;
            animation-timing-function: ease;
            animation-delay: 2s;
            animation-iteration-count: 2;
            animation-direction: alternate;
            animation-fill-mode: both; */
            animation: move 3s ease 2s 3 alternate both;
        }

        .box:hover{
            animation-play-state: paused
        }

        @keyframes move {
            from{
                /* 运动的样式要写起始值，如果不写，会从元素设置的样式中获取，若果样式中也没有，那么就不执行 */
                left: 0;
            }
            to{
                left: 500px;
            }
        }
    </style>
</head>
<body>
    <div class="box">

    </div>
</body>
</html>